<?php
    header('Access-Control-Allow-Origin: *');
    header("content-type:text/html;charset=utf-8");
    $username = $_POST['username'];
    $password = $_POST['password'];
    $link = mysql_connect('localhost', 'root', 'root') or die('数据链接失败');
    mysql_select_db('form', $link);
    $sql = "select * from `stered` where `username` ='$username' and `password` = '$password'";
    $res = mysql_query($sql);
    $row = mysql_fetch_assoc($res);
    echo json_encode($row);
?>